ReactiveUserControl class¶
Defined in
Namespace: Avalonia.ReactiveUI
Assembly: ReactiveUI.Avalonia.Autofac.dll
Full name: Avalonia.ReactiveUI.ReactiveUserControl<T>
Modifiers: public
Summary¶
A ReactiveUI UserControl that implements the IViewFor interface and
will activate your ViewModel automatically if the view model implements IActivatableViewModel.
When the DataContext property changes, this class will update the ViewModel property with the new DataContext
value, and vice versa.
Applies to
netstandard2.0, netstandard2.0, netstandard2.0, netstandard2.0, netstandard2.0
Class hierarchy
classDiagram
class ReactiveUserControl~T~
class UserControl
UserControl <|-- ReactiveUserControl~T~
class IViewFor~TViewModel~ {
<>
}
IViewFor~TViewModel~ <|.. ReactiveUserControl~T~
class IViewFor {
<>
}
IViewFor <|.. ReactiveUserControl~T~
class IActivatableView {
<>
}
IActivatableView <|.. ReactiveUserControl~T~
Inherits from: UserControl
Implements: IViewFor<TViewModel>, IViewFor, IActivatableView
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the [ReactiveUserControl](# class. |
Properties¶
| Name | Summary |
|---|---|
| ViewModel | Gets or sets the ViewModel. |
Fields¶
| Name | Summary |
|---|---|
| static ViewModelProperty | The view model property. |
Methods¶
| Name | Summary |
|---|---|
| OnDataContextChanged | Called when the DataContext property changes. |